<%@ page import="java.util.List" %>


<%@ page import="java.util.ArrayList" %>
<%@ page import="com.timeDeal.bean.PageList" %>
<%@ page import="com.timeDeal.bean.XuqiufabuBean" %><%--
  Created by IntelliJ IDEA.
  User: 叼爸爸
  Date: 2016/9/2
  Time: 8:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../inc/top.jsp"%>
<%
    PageList pagelist = new PageList();  //(PageList) request.getAttribute("pagelist");
    pagelist.setCurrentpage(2);
    pagelist.setTotalpage(5);
    pagelist.setPagesize(3);
    pagelist.setTotalrow(10);
    List<Object> li=new ArrayList<Object>();
    XuqiufabuBean[]  sb=new XuqiufabuBean[5] ;
    XuqiufabuBean cc = null ;
    for (int i = 0; i <5 ; i++) {
        cc=new XuqiufabuBean();
        cc.setMiaoshu("测试描述"+i);
        cc.setXuqiufabuid(i);
        cc.setZhuangtai("状态测试"+i);
        sb[i]=cc;
        li.add(sb[i]);
    }
    pagelist.setList(li);
%>
<div class="row">
    <div class="col-xs-12">
        <table class="table">
            <div>
            <tr>
                <th>序号</th>
                <th>需求名称</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
            <%
                if(pagelist!=null){
                    List<Object> list = pagelist.getList();
                    for(int i=0;i<list.size();i++){
                        XuqiufabuBean xuqiufabuBean=(XuqiufabuBean)list.get(i);
            %>
            <tr>
                <td><%=xuqiufabuBean.getXuqiufabuid()%></td>
                <td><%=xuqiufabuBean.getMiaoshu()%></td>
                <td><%=xuqiufabuBean.getZhuangtai()%></td>
                <td>
                    <a  href="/user/xuqiudetail">详情查看</a>
                </td>
            </tr>
            </div>
            <%
                    }
                }

                if(pagelist!=null){
            %>
            <div style="marggin-top:100px" >
            <tr>

                <td style="marggin-top:100px" colspan="6"  align="center">
                    <%
                        for(int i=0;i<pagelist.getTotalpage();i++){
                    %>
                    <span ><a href="xiangmuguanli.wst?currentpage=<%=i+1%>"><%=i+1%></a></span>
                    <%}%>
                </td>
            </tr>
            </div>
            <%}%>
        </table>
    </div>
</div>
<%@include file="../inc/bottom.jsp"%>